package one.stand.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class GoodsDetailResponse {
    @ApiModelProperty(value = "商品ID")
    private Integer id;
    @ApiModelProperty(value = "商品名称")
    private String name;
    @ApiModelProperty(value = "商品简介")
    private String description;
    @ApiModelProperty(value = "价格")
    private String price;
    @ApiModelProperty(value = "图片")
    private List<String> pics;
    @ApiModelProperty(value = "商品详情")
    private String detail;
    @ApiModelProperty(value = "规格")
    private List<Type> types;
    @ApiModelProperty(value = "VR地址")
    private String vrUrl;
    @ApiModelProperty(value = "模型数据")
    private List<GoodsDetailResponse.Model> modelParams;
    @ApiModelProperty(value = "分享码")
    private String sunCode;
    @ApiModelProperty(value = "视频")
    private String videoUrl;

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Type {
        private String name;
        private List<Sku> content;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Sku {
        private String name;
        private String price;
        private String modelId;
    }

    @Data
    @Builder
    public static class Model {
        private String modelId;
        private String modelName;
        private String modelDownloadUrl;
        private String modelZipPath;
        private String modelCoverUrl;
    }
}
